﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mapping.ByCode;

namespace Citi.HeadCount.Domain.Mapping
{
    public class TypeRuleResultMap : EntityMapping<TypeRuleResult>
    {
        public TypeRuleResultMap()
            : base(true, true)
        {
            Property(x => x.RuleResultId, m => { m.NotNullable(true); m.Length(10); });
            Property(x => x.TypeResultId, m => { m.NotNullable(true); m.Length(10); });

            ManyToOne(x => x.RuleResult, m =>
            {
                m.Column("RuleResultId");
                m.NotNullable(true);
                m.Lazy(LazyRelation.NoProxy);
                m.Insert(false);
                m.Update(false);
            });

            ManyToOne(x => x.TypeResult, m =>
            {
                m.Column("TypeResultId");
                m.NotNullable(true);
                m.Lazy(LazyRelation.NoProxy);
                m.Insert(false);
                m.Update(false);
            });
        }
    }
}
